#include <stdio.h>
#include <fcntl.h>
#include <linux/input.h>
#include <linux/uinput.h>

namespace Marco
{
   class RemoteInput
   {
      public:
         RemoteInput();
         ~RemoteInput();

         void Initialize();

         void WriteKey(__u16 key, __u16 value);
         void WriteMouse(int x, int y, int wheel);

      private:
         int    mFD;
         struct uinput_user_dev mUIDev;
         struct input_event     mEvent;

         void SendEvent(__u16 type, __u16 code, int value);
   };
}
